//
//  CalendarView.m
//  PSYWeiBo
//
//  Created by xiaotian on 16/3/14.
//  Copyright © 2016年 郑亚田. All rights reserved.
//

#import "CalendarView.h"

@interface CalendarView ()

@end

@implementation CalendarView

- (instancetype)init {
    self = [super init];
    if (self) {
        [self addAllViews];
    }
    
    return self;
}

- (void)addAllViews {
//    self.backgroundColor = [UIColor lightGrayColor];
    
    UIImageView *menuImgV = [UIImageView new];
    menuImgV.image = [UIImage imageNamed:@"dw_header_time"];
    self.calendarMenuV = [JTCalendarMenuView new];
    self.calendarMenuV.backgroundColor = [UIColor clearColor];
    [menuImgV addSubview:self.calendarMenuV];
    [self addSubview:menuImgV];
    [menuImgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(@0);
        make.height.equalTo(@30);
    }];
    [self.calendarMenuV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.equalTo(@0);
    }];
    
    self.calendarContentV = [JTHorizontalCalendarView new];
    [self addSubview:self.calendarContentV];
//    self.calendarContentV.backgroundColor = [UIColor whiteColor];
    [self.calendarContentV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(menuImgV.mas_bottom);
        make.left.bottom.right.equalTo(@0);
    }];
}

@end
